package src.data;

import src.domain.IncomingMessage;
import src.domain.MailBox;

public class IncomingMessageSRV {

	private static IncomingMessageDAO dao;
	static {
		dao = IncomingMessageDAO.getInstance();
	}
	
	public static IncomingMessage getByID(long idIncomingMessage){
		IncomingMessage incomingMessage=new IncomingMessage();
		incomingMessage.setId(idIncomingMessage);
		return dao.getByID(incomingMessage);
	}

	
	
	public static void delete(long idIncomingMessage) {
		
		dao.delete(getByID(idIncomingMessage));

	}
	

	public static MailBox getMailBoxeByIncomingMessage(IncomingMessage incomingMessage) {
		
		return dao.getMailBoxeByIncomingMessage(incomingMessage);

	}
}
